<?php
/**
 * Description of forgotpass
 * 
 * @author anhdung
 * @since 08-07-2013 - 11:26:02
 */
?>
<div class="row-fluid">
    <div class="text-center logo">
        <img src="<?php echo Yii::app()->baseUrl . '/' . Option::getItem('logo', 'header') ?>" />
    </div>
    <div class="login-box">
        <?php if (Yii::app()->user->hasFlash('success')): ?>
            <div class="alert alert-success">
                <?php echo Yii::app()->user->getFlash('success'); ?>
            </div>
        <?php endif; ?>
        <?php if (Yii::app()->user->hasFlash('error')): ?>
            <div class="alert alert-error">
                <?php echo Yii::app()->user->getFlash('error'); ?>
            </div>
        <?php endif; ?>
        <?php
        $form = $this->beginWidget('CActiveForm', array(
            'id'                   => 'forgotpassword-form',
            'enableAjaxValidation' => true,
//            'enableClientValidation' => true,
            'htmlOptions'          => array('class' => 'form-horizontal'),
            'focus'                => array($model, 'email'),
            'clientOptions'        => array(
                'validateOnSubmit' => true,
            ),
        ));
        ?>
        <h3>Forgot Password</h3>
        <?php echo CHtml::hiddenField('ajax', 'ajax-forgotpass'); ?>
        <?php echo $form->labelEx($model, 'email'); ?>
        <?php
        echo $form->textField($model, 'email', array(
            'class' => 'input-large span12',
        ));
        ?>
        <font color="red"><?php echo $form->error($model, 'email'); ?></font>
        <div class="clearfix"></div>
        <h3>Choose your account type:</h3>
        <div style="margin-left: 50px">
            <!--                    <label class="radio">
                                    <input type="radio" name="role" id="optionsRadios1" value="<?php // echo Users::TYPE_ADMIN  ?>" >
                                    Admin
                                </label>-->
            <div style="clear:both"></div>
            <label class="radio" for="optionsRadios1">
                <input type="radio" name="role" id="optionsRadios1" value="<?php echo Users::TYPE_BUSINESS ?>" checked="checked">
                Merchant
            </label>
            <div style="clear:both"></div>
            <label class="radio" for="optionsRadios2">
                <input type="radio" name="role" id="optionsRadios2" value="<?php echo Users::TYPE_STAFF ?>">
                Staff
            </label>
            <div style="clear:both"></div>
            <label class="radio" for="optionsRadios3">
                <input type="radio" name="role" id="optionsRadios3" value="<?php echo Users::TYPE_CONCIERGE ?>">
                Concierge
            </label>
        </div>
        <hr>
        <?php
        echo CHtml::submitButton('Submit', array('class' => 'btn btn-info'));
        ?>
        <?php
        echo CHtml::link('Back to login', Yii::app()->createUrl('site/login'), array('class' => 'btn'));
        ?>
        <?php $this->endWidget(); ?>
    </div>
</div>
<?php
$css  = ".row-fluid .logo{margin-top: 40px}.login-box{margin-top:35px!important}";
cs()->registerCss("#" . uniqid(), $css);
?>